import request from '@/common/utils/request'

export function getAllRole() {
  return request({
    url: 'role/get-role-list',
    method: 'post'
  })
}

export function getRoleList(data) {
  return request({
    url: 'role/list',
    method: 'post',
    data
  })
}

export function addRole(data) {
  return request({
    url: 'role/add',
    method: 'post',
    data
  })
}

export function updateRole(data) {
  return request({
    url: 'role/update',
    method: 'post',
    data
  })
}

export function deleteRole(data) {
  return request({
    url: 'role/delete',
    method: 'post',
    data
  })
}

export function getRoleResource(data) {
  return request({
    url: 'role/get-role-resource',
    method: 'post',
    data
  })
}

export function allotRoleResource(data) {
  return request({
    url: 'role/allot-role-resource',
    method: 'post',
    data
  })
}
